import request from '../http/request'

export const getTeacherList = (data) =>
  request({
    url: '/teacher/list',
    method: 'get',
    params: data
  })

export const addTeacher = (data) =>
    request({
        url: '/teacher/add',
        method: 'post',
        data
    })

//更新
export const updateTeacher = (data) =>
    request({
        url: '/teacher/update',
        method: 'put',
        data
    })

//删除
export const deleteTeacher = (id) => {
    return request({
        url: `/teacher/delete/${id}`,
        method: 'delete'
    })
};

//根据id查询老师信息

export const getTeacherById = (id) => {
    return request({
        url: `/teacher/find/${id}`,
        method: 'get',
    })
};